package com.ay.smartpark.sdk.common.utils;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * @Description map类型与其他类型的转换
 * @Date 2019/11/15 19:18
 * @Created by zcy
 */
public class MapUtils {

    /**
     * maps转list
     * @param maps  要转的maps
     * @param key   键
     * @return
     */
    public static List mapsToList(List<Map<String,Object>> maps,String key){
        ArrayList<Object> list = new ArrayList<>();
        for (Map<String, Object> map : maps) {
            list.add(map.get(key));
        }
        return list;
    }
}
